<template>
      <div class="div-section product">
      <h2>{{lover}}</h2>
      <ul class="product-list">
        <li v-for="(item,index) in flowers">
          <router-link to=""
                       :class="'product-content'">
            <div class="pic-box">
              <img :src="item.pic">
            </div>
            <div class="content-box">
              <p class="product-name">
                {{item.name}}
              </p>
              <p :class="item.tagPromo? 'product-desc text-overflow':'product-desc'">
                {{item.desc}}
              </p>
              <p v-show="item.tagPromo" class="product-tagPromo ">
                {{item.tagPromo}}
              </p>
              <p class="product-promo">
                {{item.promo}}
              </p>

              <div class="product-bottom">
                <p class="price">{{item.price}}
                  <s class="originPrice">{{item.originPrice}}</s>
                </p>
                <p class="sales">{{item.sales}}</p>
                <div class="iconfont icon-shop-cart"></div>
              </div>
            </div>
          </router-link>
        </li>
      </ul>
      <div class="product-more">
        <router-link to="">查看更多</router-link>
      </div>
    </div>

</template>

<script>
export default {
    props:['flowers','lover'],
    data(){
      return{

      }
    },
    mounted(){
      console.log(this.flowers)
    }

}
</script>
<style scoped>
.product {
  margin-top: 0.57rem;
}
.product h2 {
  text-align: center;
  padding: 20px 0px 20px 0px;
}
.product-list {
  width: 100%;
  background: white;
  text-align: center;
}
.product-list li {
  margin-bottom: 0.85rem;
}
.product-list li {
  margin-bottom: 0.85rem;
}

/* product */
.product-content {
  display: flex;
  width: 100%;
  color: inherit;
  text-decoration: none;
  text-align: left;
  font-size: 14px;
  font-weight: 300;
  overflow: hidden;
  box-shadow: 0 0.28571429rem 0.85714286rem 0 #e9ecf0;
  border-radius: 0.28571429rem;
}
.pic-box {
  width: 50%;
}
.pic-box img {
  /* display: block; */
  width: 100%;
  height: 100%;
  vertical-align: middle;
}
.content-box {
  width: 50%;
  flex: 1;
  padding: 0px 20px 0px 20px;
  overflow: hidden;
}
.product-name {
  padding-top: 1.28rem;
}
.product-desc {
  font-size: 0.75rem;
}
.text-overflow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-tagPromo {
  display: inline-block;
  background-color: #ff734c;
  color: white;
  font-size: 0.75rem;
  width: auto;
  margin-top: 6px;
  border-radius: 10rem;
  border: 1px solid #ff734c;
  padding: 0rem 0.2rem 0rem 0.2rem;
}
.tagPromo-bg{
  background-color:white;
  color:  #ff734c;
}
.product-promo {
  margin-top: 0.85rem;
  padding: 0.72rem 0;
  border-top: 1px solid #e9ecf0;
  border-bottom: 1px solid #e9ecf0;
  font-size: 0.78rem;
  font-weight: 500;
}
.product-bottom {
  margin-top: 0.5rem;
  position: relative;
}
.price {
  font-size: 1.1rem;
  color: #ff734c;
  font-weight: 500;
}
.originPrice {
  font-size: 0.7rem;
  color: #71797f;
  font-weight: 500;
}
.icon-shop-cart {
  position: absolute;
  color: #232628;
  top: 13px;
  right: 0px;
  font-size: 1rem;
}
.sales {
  font-size: 0.7rem;
}
.product-more {
  text-align: center;
  margin-top: 20px;
}
.product-more .router-link-active {
  display: inline-block;
  text-decoration: none;
  font-size: 0.7rem;
  border: 1px solid black;
  width: 5.6rem;
  height: 1.4rem;
  color: black;
  line-height: 1.3rem;
}
</style>